﻿Imports DTO


Public Class PhieuTra_DAO
    Public Shared Function loadPhieuTra() As DataTable
        Return DataProvider.loadDataTable("select *from phieutra")
    End Function

    Public Shared Sub themPhieuTra(ByVal ds As List(Of PhieuTra_DTO))
        For Each item As PhieuTra_DTO In ds
            Dim sql As String = String.Format("insert into phieutra values({0}, {1}, {2}, '{3}', '{4}', '{5}')", item.maMuon, item.maDauSach, item.slSach, item.ngayTra, item.tienPhat, item.tienMuon)
            DataProvider.ExecuteNonQuery(sql)
        Next

    End Sub

End Class
